package com.example.design.responsibilityChainDemo;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/chain")
public class TestChain {
    @RequestMapping("/test")
    public String test() {
//        PayChain payChain = new PayChain();
//        EatChain eatChain = new EatChain();
//        eatChain.setResponsibility(payChain);
//        eatChain.deal();

        new EatChain().setResponsibility(new PayChain());
        return "执行成功";
    }

}
